package com.xydtech.busiflw.service.impl;

import com.xydtech.busiflw.domain.BusiflDocReg;
import com.xydtech.busiflw.mapper.BusiflDocRegMapper;
import com.xydtech.busiflw.service.IBusiflDocRegService;
import com.xydtech.common.core.text.Convert;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 业务流程影像上传登记Service业务层处理
 *
 * @author JHON
 * @date 2022-01-05
 */
@Service
public class BusiflDocRegServiceImpl implements IBusiflDocRegService {
    @Autowired
    private BusiflDocRegMapper busiflDocRegMapper;

    /**
     * 查询业务流程影像上传登记
     *
     * @param docRegId 业务流程影像上传登记主键
     * @return 业务流程影像上传登记
     */
    @Override
    public BusiflDocReg selectBusiflDocRegByDocRegId(Long docRegId) {
        return busiflDocRegMapper.selectBusiflDocRegByDocRegId(docRegId);
    }

    /**
     * 查询业务流程影像上传登记列表
     *
     * @param busiflDocReg 业务流程影像上传登记
     * @return 业务流程影像上传登记
     */
    @Override
    public List<BusiflDocReg> selectBusiflDocRegList(BusiflDocReg busiflDocReg) {
        return busiflDocRegMapper.selectBusiflDocRegList(busiflDocReg);
    }

    /**
     * 新增业务流程影像上传登记
     *
     * @param busiflDocReg 业务流程影像上传登记
     * @return 结果
     */
    @Override
    public int insertBusiflDocReg(BusiflDocReg busiflDocReg) {
        return busiflDocRegMapper.insertBusiflDocReg(busiflDocReg);
    }

    /**
     * 修改业务流程影像上传登记
     *
     * @param busiflDocReg 业务流程影像上传登记
     * @return 结果
     */
    @Override
    public int updateBusiflDocReg(BusiflDocReg busiflDocReg) {
        return busiflDocRegMapper.updateBusiflDocReg(busiflDocReg);
    }

    /**
     * 批量删除业务流程影像上传登记
     *
     * @param docRegIds 需要删除的业务流程影像上传登记主键
     * @return 结果
     */
    @Override
    public int deleteBusiflDocRegByDocRegIds(String docRegIds) {
        return busiflDocRegMapper.deleteBusiflDocRegByDocRegIds(Convert.toStrArray(docRegIds));
    }

    /**
     * 删除业务流程影像上传登记信息
     *
     * @param docRegId 业务流程影像上传登记主键
     * @return 结果
     */
    @Override
    public int deleteBusiflDocRegByDocRegId(Long docRegId) {
        return busiflDocRegMapper.deleteBusiflDocRegByDocRegId(docRegId);
    }
}
